/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.OrderDetailDao;
import com.techshop.model.OrderDetail;
import com.techshop.service.OrderDetailService;
import java.util.List;

/**
 *
 * @author Hai-PC
 */
public class OrderDetailServiceImpl implements OrderDetailService
{
    private OrderDetailDao orderDetailDao;
    
    @Override
    public List<OrderDetail> findAll()
    {
        return orderDetailDao.findAll();
    }

    @Override
    public OrderDetail getById(int deliveryNoteDetailsId)
    {
        return orderDetailDao.getById(deliveryNoteDetailsId);
    }

    @Override
    public List<OrderDetail> getByDeliveryNoteId(int deliveryNoteId)
    {
        return orderDetailDao.getByDeliveryNoteId(deliveryNoteId);
    }
    
    @Override
    public int getOrderQuantity(String storeId, String productId, String colorId)
    {
        return orderDetailDao.getOrderQuantity(storeId, productId, colorId);
    }
    
    @Override
    public boolean insert(OrderDetail deliveryNoteDetails)
    {
        return orderDetailDao.insert(deliveryNoteDetails);
    }

    @Override
    public boolean update(OrderDetail deliveryNoteDetails)
    {
        return orderDetailDao.update(deliveryNoteDetails);
    }

    @Override
    public boolean updateAll(List<OrderDetail> deliveryNoteDetailsList)
    {
        return orderDetailDao.updateAll(deliveryNoteDetailsList);
    }
    
    @Override
    public boolean delete(OrderDetail deliveryNoteDetails)
    {
        return orderDetailDao.delete(deliveryNoteDetails);
    }

    /**
     * @return the orderDetailDao
     */
    public OrderDetailDao getOrderDetailDao()
    {
        return orderDetailDao;
    }

    /**
     * @param orderDetailDao the orderDetailDao to set
     */
    public void setOrderDetailDao(OrderDetailDao orderDetailDao)
    {
        this.orderDetailDao = orderDetailDao;
    }
}